feat: AuditDotfiles skill (+ forge-cli 0.3 compat)#12
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AuditDotfilesskill (skills/AuditDotfiles/) — captures the migration-time secret audit workflow: scan a dotfiles tree with gitleaks (redacted), aggregate findings by top-level directory and rule, and surgically filter flagged lines from shell-history files so the rest can be imported into atuin. Composes with SecretScan in forge-core (commit-time prevention).scripts/audit-dotfiles.shinside the skill dir — executable end-to-end pipeline. Uses gitleaks + yq (mikefarah's) + awk + sed. Exits 0 when clean, 1 when leaks found..githooks/pre-commitandMakefile— drops the positional.fromforge validateandforge install(now flag-only--source <DIR>with default.). Without this, the pre-commit hook fails on every commit.The SKILL.md notes the key constraint behind the design: never bulk-delete a flagged history file — years of useful recall live in those lines; surgical line-filtering preserves the rest. Also: don't pre-split
&&chains before atuin import (atuin's fulltext search matches against the whole command).Test plan
git commitand validates (this PR's commits are signed and the hook ran)audit-dotfiles.sh <path>dependency check exits 2 whengitleaks/yq/awkmissingaudit-dotfiles.sh <path>exits 0 with "no leaks found" message on a clean directory (verified on~/Downloads/dotfiles, a public xero-fork)audit-dotfiles.sh <path>exits 1 with per-dir-per-rule aggregation on~/Downloads/dotfiles-private(18 leaks across 5 rule types)audit-dotfiles.sh <path> --filter-historyemits<history>.cleannext to the flagged file with leaked lines strippedmake installdeploys the skill via forge-cli 0.3.1 end-to-end